#!/bin/bash

# GGB Generation Conversation API 启动脚本

echo "🚀 启动 GGB Generation Conversation API..."
echo "📍 服务地址: http://localhost:8080"
echo "📚 API 文档: http://localhost:8080/docs"
echo "🔍 健康检查: http://localhost:8080/health"
echo ""

# 检查 Python 环境
if ! command -v python &> /dev/null; then
    echo "❌ 错误: 未找到 Python，请确保已安装 Python 3.8+"
    exit 1
fi

# 检查依赖
echo "🔍 检查依赖..."
python -c "import fastapi, httpx, pydantic" 2>/dev/null
if [ $? -ne 0 ]; then
    echo "❌ 错误: 缺少必要依赖，请运行: pip install -r requirements.txt"
    exit 1
fi

echo "✅ 依赖检查通过"
echo ""

# 启动服务
echo "🎯 启动对话服务..."
python introduction_files/conversation_app.py 